<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>Firmware for Arduino | PLEN Project Company Inc.: Interpreter.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Firmware for Arduino | PLEN Project Company Inc.
   </div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_interpreter_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">Interpreter.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_interpreter_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#pragma once</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;</div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#ifndef PLEN2_INTERPRETER_H</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"><a class="line" href="_interpreter_8h.html#a8c16928833e92cbb5c646a90e75f9fcc">   11</a></span>&#160;<span class="preprocessor">#define PLEN2_INTERPRETER_H</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;</div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;</div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespace_p_l_e_n2.html">PLEN2</a></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;{</div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;    <span class="keyword">class </span>Interpreter;</div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;    <span class="keyword">class </span>MotionController;</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;}</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div>
<div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="class_p_l_e_n2_1_1_interpreter.html">   29</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_p_l_e_n2_1_1_interpreter.html">PLEN2::Interpreter</a></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;{</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="struct_p_l_e_n2_1_1_interpreter_1_1_code.html">   35</a></span>&#160;    <span class="keyword">struct </span><a class="code" href="struct_p_l_e_n2_1_1_interpreter_1_1_code.html">Code</a></div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    {</div>
<div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="struct_p_l_e_n2_1_1_interpreter_1_1_code.html#a6f73c960a109b65033853c9f3ae9e10b">   37</a></span>&#160;        uint8_t <a class="code" href="struct_p_l_e_n2_1_1_interpreter_1_1_code.html#a6f73c960a109b65033853c9f3ae9e10b">slot</a>;       </div>
<div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="struct_p_l_e_n2_1_1_interpreter_1_1_code.html#ab93978e19e6daf011a040eba4c64fa3e">   38</a></span>&#160;        uint8_t <a class="code" href="struct_p_l_e_n2_1_1_interpreter_1_1_code.html#ab93978e19e6daf011a040eba4c64fa3e">loop_count</a>; </div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    };</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div>
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="class_p_l_e_n2_1_1_interpreter.html#abdb8b4bb13c67058bb1ed26aee8e1ceea3cf15be450d80e17ad44d875d94c5e4c">   47</a></span>&#160;    <span class="keyword">enum</span> { <a class="code" href="class_p_l_e_n2_1_1_interpreter.html#abdb8b4bb13c67058bb1ed26aee8e1ceea3cf15be450d80e17ad44d875d94c5e4c">QUEUE_SIZE</a> = 32 };</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <a class="code" href="class_p_l_e_n2_1_1_interpreter.html#aac9749afd6dac56940ea7273d477f1b9">Interpreter</a>(<a class="code" href="class_p_l_e_n2_1_1_motion_controller.html">MotionController</a>&amp; motion_ctrl);</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_p_l_e_n2_1_1_interpreter.html#a19f962308c5fb11d4505333dd5151717">pushCode</a>(<span class="keyword">const</span> Code&amp; code);</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_p_l_e_n2_1_1_interpreter.html#aafd2c57c53e9ee84e352f796015921a7">popCode</a>();</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_p_l_e_n2_1_1_interpreter.html#a18dde2590b456d9908357018f4f856c0">ready</a>();</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_p_l_e_n2_1_1_interpreter.html#a675df8e05575b87114a7bbcedcf2a4a9">reset</a>();</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    Code m_code_queue[<a class="code" href="class_p_l_e_n2_1_1_interpreter.html#abdb8b4bb13c67058bb1ed26aee8e1ceea3cf15be450d80e17ad44d875d94c5e4c">QUEUE_SIZE</a>];</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    uint8_t m_queue_begin;</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    uint8_t m_queue_end;</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    <a class="code" href="class_p_l_e_n2_1_1_motion_controller.html">MotionController</a>* m_motion_ctrl_ptr;</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;};</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;<span class="preprocessor">#endif // PLEN2_INTERPRETER_H</span></div>
<div class="ttc" id="namespace_p_l_e_n2_html"><div class="ttname"><a href="namespace_p_l_e_n2.html">PLEN2</a></div><div class="ttdef"><b>Definition:</b> AccelerationGyroSensor.h:16</div></div>
<div class="ttc" id="class_p_l_e_n2_1_1_interpreter_html_aafd2c57c53e9ee84e352f796015921a7"><div class="ttname"><a href="class_p_l_e_n2_1_1_interpreter.html#aafd2c57c53e9ee84e352f796015921a7">PLEN2::Interpreter::popCode</a></div><div class="ttdeci">bool popCode()</div><div class="ttdoc">Run a code in heading of the queue. </div></div>
<div class="ttc" id="class_p_l_e_n2_1_1_interpreter_html_aac9749afd6dac56940ea7273d477f1b9"><div class="ttname"><a href="class_p_l_e_n2_1_1_interpreter.html#aac9749afd6dac56940ea7273d477f1b9">PLEN2::Interpreter::Interpreter</a></div><div class="ttdeci">Interpreter(MotionController &amp;motion_ctrl)</div><div class="ttdoc">Constructor. </div></div>
<div class="ttc" id="struct_p_l_e_n2_1_1_interpreter_1_1_code_html_ab93978e19e6daf011a040eba4c64fa3e"><div class="ttname"><a href="struct_p_l_e_n2_1_1_interpreter_1_1_code.html#ab93978e19e6daf011a040eba4c64fa3e">PLEN2::Interpreter::Code::loop_count</a></div><div class="ttdeci">uint8_t loop_count</div><div class="ttdoc">Loop count. (Using 255 as infinity.) </div><div class="ttdef"><b>Definition:</b> Interpreter.h:38</div></div>
<div class="ttc" id="struct_p_l_e_n2_1_1_interpreter_1_1_code_html_a6f73c960a109b65033853c9f3ae9e10b"><div class="ttname"><a href="struct_p_l_e_n2_1_1_interpreter_1_1_code.html#a6f73c960a109b65033853c9f3ae9e10b">PLEN2::Interpreter::Code::slot</a></div><div class="ttdeci">uint8_t slot</div><div class="ttdoc">Slot number of a motion. </div><div class="ttdef"><b>Definition:</b> Interpreter.h:37</div></div>
<div class="ttc" id="class_p_l_e_n2_1_1_interpreter_html_abdb8b4bb13c67058bb1ed26aee8e1ceea3cf15be450d80e17ad44d875d94c5e4c"><div class="ttname"><a href="class_p_l_e_n2_1_1_interpreter.html#abdb8b4bb13c67058bb1ed26aee8e1ceea3cf15be450d80e17ad44d875d94c5e4c">PLEN2::Interpreter::QUEUE_SIZE</a></div><div class="ttdef"><b>Definition:</b> Interpreter.h:47</div></div>
<div class="ttc" id="class_p_l_e_n2_1_1_interpreter_html_a19f962308c5fb11d4505333dd5151717"><div class="ttname"><a href="class_p_l_e_n2_1_1_interpreter.html#a19f962308c5fb11d4505333dd5151717">PLEN2::Interpreter::pushCode</a></div><div class="ttdeci">bool pushCode(const Code &amp;code)</div><div class="ttdoc">Reserve to run a code. </div></div>
<div class="ttc" id="class_p_l_e_n2_1_1_interpreter_html_a675df8e05575b87114a7bbcedcf2a4a9"><div class="ttname"><a href="class_p_l_e_n2_1_1_interpreter.html#a675df8e05575b87114a7bbcedcf2a4a9">PLEN2::Interpreter::reset</a></div><div class="ttdeci">void reset()</div><div class="ttdoc">Reset the interpreter. </div></div>
<div class="ttc" id="class_p_l_e_n2_1_1_motion_controller_html"><div class="ttname"><a href="class_p_l_e_n2_1_1_motion_controller.html">PLEN2::MotionController</a></div><div class="ttdoc">Management class of a motion. </div><div class="ttdef"><b>Definition:</b> MotionController.h:36</div></div>
<div class="ttc" id="class_p_l_e_n2_1_1_interpreter_html"><div class="ttname"><a href="class_p_l_e_n2_1_1_interpreter.html">PLEN2::Interpreter</a></div><div class="ttdoc">Management class of interpreter. </div><div class="ttdef"><b>Definition:</b> Interpreter.h:29</div></div>
<div class="ttc" id="struct_p_l_e_n2_1_1_interpreter_1_1_code_html"><div class="ttname"><a href="struct_p_l_e_n2_1_1_interpreter_1_1_code.html">PLEN2::Interpreter::Code</a></div><div class="ttdoc">Code struct. </div><div class="ttdef"><b>Definition:</b> Interpreter.h:35</div></div>
<div class="ttc" id="class_p_l_e_n2_1_1_interpreter_html_a18dde2590b456d9908357018f4f856c0"><div class="ttname"><a href="class_p_l_e_n2_1_1_interpreter.html#a18dde2590b456d9908357018f4f856c0">PLEN2::Interpreter::ready</a></div><div class="ttdeci">bool ready()</div><div class="ttdoc">Decide if there are codes which are reserved to run. </div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="_interpreter_8h.html">Interpreter.h</a></li>
    <li class="footer">Generated on Tue Oct 11 2016 13:20:21 for Firmware for Arduino | PLEN Project Company Inc. by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
  </ul>
</div>
</body>
</html>
